import request from '../utils/request'

// 获取组织架构的数据
export function getDepartment(){
    return request({
        url:'/company/department',
        method:'get'
    })
}

// 删除组织架构部门
export function delDepartment(id){
  return request({
    url: `/company/department/${id}`,
    method:"delete"
  })
}


// 新增部门接口
export function addDepartment(data){
  return request({
    url: '/company/department',
    method:'post',
    data
  })
}

// 获取部门信息
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 编辑部门信息
export function updataDepartments(data){
  return request({
    url: `/company/department/${data.id}`,
    method:'put',
    data
  })
}

